
def _getMatrix():
   matrix = []
   for i in range(3):
      row = [float(num) for num in input().strip().split(" ")]
      matrix.append(row)
   return matrix




def swap_rows(matrix, row1, row2):
    matrix[row1], matrix[row2] = matrix[row2], matrix[row1]

def solve(matrix):
    n = len(matrix)


    augmented_matrix = [matrix[i] + [1 if i == j else 0 for j in range(n)] for i in range(n)]


    for i in range(n):

        if augmented_matrix[i][i] == 0:

            for j in range(i + 1, n):
                if augmented_matrix[j][i] != 0:
                    swap_rows(augmented_matrix, i, j)
                    break


        pivot = augmented_matrix[i][i]
        for j in range(2 * n):
            augmented_matrix[i][j] /= pivot


        for k in range(n):
            if k != i:
                factor = augmented_matrix[k][i]
                for j in range(2 * n):
                    augmented_matrix[k][j] -= factor * augmented_matrix[i][j]

    inverse_matrix = [row[n:] for row in augmented_matrix]


    return [[value for value in row] for row in inverse_matrix]


matrix=_getMatrix()
ans=solve(matrix)


for row in ans:
    for num in row:
        # if(abs(num)<0.00001):
        #     num=0
        print("%.4f"%num, end=" ")
    print()



